package com.iiiss.template.ssh.impl.beans;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;

import org.hibernate.annotations.Index;

import com.iiiss.template.ssh.core.beans.IUser;

import com.iiiss.template.ssh.common.impl.BaseBean;

/*
 * TemplateSSH - com.iiiss.template.ssh.impl.beans - User.java
 * 
 * Copyright (C) 2011  Mingye Cheng <Cheng, Mingye at GMAIL>
 * 
 * User.java is part of <iiiStudio Template Framework> project.
 * This project is hosted at <http://iiiss-template-ssh.googlecode.com>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * Revision history:
 * [2011-6-1] Mingye Cheng - Initial version established.
 * [2011-7-6] Mingye Cheng - Moved to 'impl' package.
 * [2011-9-2] Mingye Cheng - Index of 'username' created.
 */
@Entity
public class User extends BaseBean implements IUser {
	@Basic
	@Column(unique = true)
	@Index(name = "usernameIndex")
	private String username;

	@Basic
	private String password;

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
}
